app.service('lineCustomService', ['ajax','$q',function (ajax,$q) {

    this.list = function (data){
        var deferred = $q.defer();
        ajax.get({
            url: 'back/customer/page',
            data: data,
            debug: true
        }).then(function (result) {
            console.log(result.currentPage);

            deferred.resolve(result);
        })
        return deferred.promise;
    }


    this.detail = function(id){
        var deferred = $q.defer();
        ajax.get({
            url: 'back/customer/query',
            data: {
                customerId: id,

            }
        }).then(function (result) {
            deferred.resolve(result);
        })
        return deferred.promise;
    }
}]);